package com.lyz.dataStructure.algorithm.完美世界2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 19:35
 * @Description:
 **/

import java.util.Arrays;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/23 19:35
 *@Description:
 **/
public class Main1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] st = s.split(" ");
        int[] nums = new int[st.length];
        for (int i = 0; i < nums.length; i++) {
            nums[i] = Integer.parseInt(st[i]);
        }
        int limit = sc.nextInt();
      Arrays.sort(nums,0,nums.length);
        int i =0,j =nums.length-1;
        int count = 0;
        while (i<=j){
            if(i==j){
                count++;
                break;
            }
            if(nums[i]+nums[j]<=limit){
                count++;
                i++;
                j--;
            }else {
                count++;
                j--;
            }
        }
        System.out.println(count);

    }
}
